Attribute VB_Name = "conexion_bd"
Public Function conexion()
'CONEXION AL MANEJADOR DE BASE DE DATOS MYSQL
Set conn = New ADODB.Connection
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
          & "SERVER=127.0.0.1;" _
          & "DATABASE=aguas;" _
          & "UID=web;" _
          & "PWD=;" _
          & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
conn.CursorLocation = adUseClient

conn.Open 'Se inicia la conexion
End Function
Public Function finsert_Ado(vpsSql As String, conn As ADODB.Connection) As Boolean
  Dim vpl_Reg_Cmd As ADODB.Command
  'Dim conn As ADODB.Connection
On Error GoTo Error1
  Set vpl_Reg_Cmd = New ADODB.Command
  vpl_Reg_Cmd.ActiveConnection = conn
  vpl_Reg_Cmd.CommandText = vpsSql
  vpl_Reg_Cmd.Execute
  finsert_Ado = True
  Exit Function
Error1:
    finsert_Ado = False
End Function


